﻿using System;
using System.Data;
using System.Data.Common;
using System.Collections.Generic;
using Runda.EShop.Common.Utility;
using Runda.EShop.Common.Entity;

namespace Runda.EShop.Dal
{ 
    public partial class BizOrderComplaintDal  
    {
        public DataTable GetOrderComplaintEntity(Guid ComplainID)
        {
            string sql = @"select A.*,B.CustomerName from Biz_Order_Complaint A join Biz_Customer B ON A.CustomerID = B.CustomerID WHERE A.ComplainID=@ComplainID";

            DbCommand dbcommand = CurrentDatabase.GetSqlStringCommand(sql);
            CurrentDatabase.AddInParameter(dbcommand, "@ComplainID", DbType.Guid, ComplainID);

            return CurrentDatabase.ExecuteDataSet(dbcommand).Tables[0];
        }
    }
}
